﻿using System;
using System.Collections.Generic;
using System.Text;

namespace gChartSharp
{
    public class LineStyleParam : ParamBase<LineStyle>, IRenderable
    {
        public override string Name { get { return "chls"; } }

        protected override char ParamSeparator { get { return '|'; } }
    }


    public class LineStyle : IRenderable
    {
        /// <summary>
        /// The thickness of a line
        /// </summary>
        public float LineThickness { get; set; }


        /// <summary>
        /// The length of the line segment
        /// </summary>
        public float LineSegmentLength { get; set; }


        /// <summary>
        /// The length of the blank segment
        /// </summary>
        public float BlankSegmentLength { get; set; }


        public LineStyle(float lineThickness, float lineSegmentLength, float blankSegmentLength)
        {
            LineThickness = lineThickness;
            LineSegmentLength = lineSegmentLength;
            BlankSegmentLength = blankSegmentLength;
        }


        public string Render()
        {
            return String.Format("{0},{1},{2}", LineThickness, LineSegmentLength, BlankSegmentLength);
        }
    }
}
